import React from 'react';
import { Modal,Form,Input, Select,Button } from 'antd'; 

interface CreateFormProps {
  modalVisible: boolean;
  onCancel: () => void;
}

const CreateCourse: React.FC<CreateFormProps> = (props) => {
  const { modalVisible, onCancel } = props;

  return (
    <Modal
      destroyOnClose
      title="新建规则"
      visible={modalVisible}
      onCancel={() => onCancel()}
      footer={null}
    >
     <Form>
       <Form.Item 
        name=""
        label="课程名称"
        rules={[{ required: true, message: '课程名称必须写！' }]}
       > 
         <Input/>
       </Form.Item>
       <Form.Item 
        name=""
        label="课程代码"
        rules={[{ required: true, message: '课程代码必须写！' }]}
       > 
         <Input/>
       </Form.Item>
       <Form.Item
       name=""
       label="开课院系"
       rules={[{ required: true, message: '院系必选！' }]}
       >
         <Select>

         </Select>
       </Form.Item>
       <Form.Item
       name=""
       label="实践类型"
       rules={[{ required: true, message: '实践类型必选！' }]}
       >
         <Select>

         </Select>
       </Form.Item>
       <Form.Item
       name=""
       label="适用专业"
       rules={[{ required: true, message: '适用专业必选！' }]}
       >
         <Select> 
         </Select>
       </Form.Item>
       <Form.Item 
        name=""
        label="学时周数"
        rules={[{ required: true, message: '学时周数必须写！' }]}
       > 
         <Input/>
       </Form.Item>
       <Form.Item 
        name=""
        label="学分"
        rules={[{ required: true, message: '学分必须写！' }]}
       > 
         <Input/>
       </Form.Item>
        <Form.Item
       name=""
       label="修读性值"
       rules={[{ required: true, message: '修读性值必选！' }]}
       >
         <Select> 
           <Select.Option value=''>
                  必修
           </Select.Option>
           <Select.Option value=''>
                  选修
           </Select.Option>
         </Select>
       </Form.Item>
       <Form.Item
       name=""
       label="开课学期"
       rules={[{ required: true, message: '开课学期必选！' }]}
       >
         <Select> 
         </Select>
       </Form.Item>
       <Form.Item>
          <Button type="primary" htmlType="submit"  >
            提交
          </Button>
        </Form.Item>
     </Form>
    </Modal>
  );
};

export default CreateCourse;
